package com.jpcc.vw.onlineRadio.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.CustomIntent;
import android.content.Intent;
import android.text.TextUtils;

import com.jpcc.vw.onlineRadio.constants.Constants;
import com.jpcc.vw.onlineRadio.service.PlayAlbumRadioService;
import com.orhanobut.logger.Logger;

public class BootBroadcastReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        Logger.i("onReceive-->BootBroadcastReceiver");
        if(TextUtils.isEmpty(intent.getStringExtra(CustomIntent.EXTRA_COMMAND))){
            Intent intentServcie = new Intent(context, PlayAlbumRadioService.class);
            Constants.NeedInitDataFlag=true;
            Constants.LastModeFlag=true;
            context.startForegroundService(intentServcie);
        }
    }
}
